diff -ur synergy-1.3.1/lib/arch/CArchDaemonUnix.cpp synergy-1.3.1-new/lib/arch/CArchDaemonUnix.cpp
--- synergy-1.3.1/lib/arch/CArchDaemonUnix.cpp	2005-04-23 22:02:12.000000000 -0500
+++ synergy-1.3.1-new/lib/arch/CArchDaemonUnix.cpp	2009-08-24 14:09:57.627706592 -0500
@@ -19,6 +19,7 @@
 #include <sys/stat.h>
 #include <fcntl.h>
 #include <errno.h>
+#include <stdlib.h>
 
 //
 // CArchDaemonUnix
diff -ur synergy-1.3.1/lib/arch/CMultibyte.cpp synergy-1.3.1-new/lib/arch/CMultibyte.cpp
--- synergy-1.3.1/lib/arch/CMultibyte.cpp	2005-11-29 22:33:24.000000000 -0600
+++ synergy-1.3.1-new/lib/arch/CMultibyte.cpp	2009-08-24 13:57:23.713710783 -0500
@@ -15,6 +15,7 @@
 #ifndef CMULTIBYTE_H
 #define CMULTIBYTE_H
 
+#include <stdlib.h>
 #include "common.h"
 #include "CArch.h"
 #include <limits.h>
diff -ur synergy-1.3.1/lib/base/CStringUtil.cpp synergy-1.3.1-new/lib/base/CStringUtil.cpp
--- synergy-1.3.1/lib/base/CStringUtil.cpp	2005-12-14 11:25:20.000000000 -0600
+++ synergy-1.3.1-new/lib/base/CStringUtil.cpp	2009-08-24 13:58:00.681805838 -0500
@@ -19,6 +19,7 @@
 #include <cctype>
 #include <cstdio>
 #include <cstdlib>
+#include <string.h>
 #include <algorithm>
 
 //
diff -ur synergy-1.3.1/lib/client/CClient.cpp synergy-1.3.1-new/lib/client/CClient.cpp
--- synergy-1.3.1/lib/client/CClient.cpp	2006-03-08 22:07:17.000000000 -0600
+++ synergy-1.3.1-new/lib/client/CClient.cpp	2009-08-24 14:02:33.299732643 -0500
@@ -26,6 +26,8 @@
 #include "CLog.h"
 #include "IEventQueue.h"
 #include "TMethodEventJob.h"
+#include <stdlib.h>
+#include <string.h>
 
 //
 // CClient
diff -ur synergy-1.3.1/lib/client/CServerProxy.cpp synergy-1.3.1-new/lib/client/CServerProxy.cpp
--- synergy-1.3.1/lib/client/CServerProxy.cpp	2006-04-01 19:47:03.000000000 -0600
+++ synergy-1.3.1-new/lib/client/CServerProxy.cpp	2009-08-24 14:03:03.516706453 -0500
@@ -24,6 +24,7 @@
 #include "TMethodEventJob.h"
 #include "XBase.h"
 #include <memory>
+#include <string.h>
 
 //
 // CServerProxy
diff -ur synergy-1.3.1/lib/net/CTCPSocket.cpp synergy-1.3.1-new/lib/net/CTCPSocket.cpp
--- synergy-1.3.1/lib/net/CTCPSocket.cpp	2006-04-01 19:47:03.000000000 -0600
+++ synergy-1.3.1-new/lib/net/CTCPSocket.cpp	2009-08-24 13:58:32.584710294 -0500
@@ -24,6 +24,7 @@
 #include "CArch.h"
 #include "XArch.h"
 #include <string.h>
+#include <stdlib.h>
 
 //
 // CTCPSocket
diff -ur synergy-1.3.1/lib/platform/CXWindowsScreen.cpp synergy-1.3.1-new/lib/platform/CXWindowsScreen.cpp
--- synergy-1.3.1/lib/platform/CXWindowsScreen.cpp	2006-04-02 14:16:39.000000000 -0500
+++ synergy-1.3.1-new/lib/platform/CXWindowsScreen.cpp	2009-08-24 14:02:02.271706872 -0500
@@ -12,6 +12,7 @@
  * GNU General Public License for more details.
  */
 
+#include <stdlib.h>
 #include "CXWindowsScreen.h"
 #include "CXWindowsClipboard.h"
 #include "CXWindowsEventQueueBuffer.h"
diff -ur synergy-1.3.1/lib/server/CClientProxy1_3.cpp synergy-1.3.1-new/lib/server/CClientProxy1_3.cpp
--- synergy-1.3.1/lib/server/CClientProxy1_3.cpp	2006-02-12 13:53:43.000000000 -0600
+++ synergy-1.3.1-new/lib/server/CClientProxy1_3.cpp	2009-08-24 14:07:06.188709875 -0500
@@ -17,6 +17,7 @@
 #include "CLog.h"
 #include "IEventQueue.h"
 #include "TMethodEventJob.h"
+#include <string.h>
 
 //
 // CClientProxy1_3
diff -ur synergy-1.3.1/lib/server/CServer.cpp synergy-1.3.1-new/lib/server/CServer.cpp
--- synergy-1.3.1/lib/server/CServer.cpp	2006-04-01 19:47:04.000000000 -0600
+++ synergy-1.3.1-new/lib/server/CServer.cpp	2009-08-24 14:07:45.934730199 -0500
@@ -29,6 +29,7 @@
 #include "TMethodEventJob.h"
 #include "CArch.h"
 #include <string.h>
+#include <stdlib.h>
 
 //
 // CServer
diff -ur synergy-1.3.1/lib/synergy/CPacketStreamFilter.cpp synergy-1.3.1-new/lib/synergy/CPacketStreamFilter.cpp
--- synergy-1.3.1/lib/synergy/CPacketStreamFilter.cpp	2005-04-23 22:02:16.000000000 -0500
+++ synergy-1.3.1-new/lib/synergy/CPacketStreamFilter.cpp	2009-08-24 13:59:18.251730269 -0500
@@ -16,6 +16,7 @@
 #include "IEventQueue.h"
 #include "CLock.h"
 #include "TMethodEventJob.h"
+#include <string.h>
 
 //
 // CPacketStreamFilter
diff -ur synergy-1.3.1/lib/synergy/IKeyState.cpp synergy-1.3.1-new/lib/synergy/IKeyState.cpp
--- synergy-1.3.1/lib/synergy/IKeyState.cpp	2006-03-21 23:40:27.000000000 -0600
+++ synergy-1.3.1-new/lib/synergy/IKeyState.cpp	2009-08-24 13:59:55.329705754 -0500
@@ -14,6 +14,7 @@
 
 #include "IKeyState.h"
 #include <string.h>
+#include <stdlib.h>
 
 //
 // IKeyState
diff -ur synergy-1.3.1/lib/synergy/IPrimaryScreen.cpp synergy-1.3.1-new/lib/synergy/IPrimaryScreen.cpp
--- synergy-1.3.1/lib/synergy/IPrimaryScreen.cpp	2006-03-21 23:40:27.000000000 -0600
+++ synergy-1.3.1-new/lib/synergy/IPrimaryScreen.cpp	2009-08-24 14:01:14.935708548 -0500
@@ -13,6 +13,7 @@
  */
 
 #include "IPrimaryScreen.h"
+#include <stdlib.h>
 
 //
 // IPrimaryScreen
